{"ast":null,"code":"var _jsxFileName = \"/data/messenger.client/src/containers/GetUserDialog.tsx\",\n  _s = $RefreshSig$();\nimport React from 'react';\nimport { observer } from \"mobx-react-lite\";\nimport { Context } from \"../index\";\nimport { GetUserDialog as GetUserDialogComponent } from \"../components\";\nimport { browserRouteIm } from \"../routes\";\nimport { useNavigate } from \"react-router-dom\";\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\nimport { Fragment as _Fragment } from \"react/jsx-dev-runtime\";\nconst GetUserDialog = props => {\n  _s();\n  const {\n    store\n  } = React.useContext(Context);\n  const navigate = useNavigate();\n  const handleOnClick = () => {\n    store.getDialogOrNewFromAPI(props.profile).then(chat => {\n      if (chat) {\n        store.setCurrentDialog({\n          ...store.getCurrentDialog(),\n          ...chat\n        });\n        store.setViewedDialogId(chat.id);\n        navigate(browserRouteIm);\n      }\n    });\n  };\n  if (!props.selfProfile) {\n    return /*#__PURE__*/_jsxDEV(GetUserDialogComponent, {\n      callback: handleOnClick\n    }, void 0, false, {\n      fileName: _jsxFileName,\n      lineNumber: 28,\n      columnNumber: 13\n    }, this);\n  } else {\n    return /*#__PURE__*/_jsxDEV(_Fragment, {}, void 0, false);\n  }\n};\n_s(GetUserDialog, \"f2Om6T9jLHBE08wT2pSNeboDwI0=\", false, function () {\n  return [useNavigate];\n});\n_c = GetUserDialog;\nexport default _c2 = observer(GetUserDialog);\nvar _c, _c2;\n$RefreshReg$(_c, \"GetUserDialog\");\n$RefreshReg$(_c2, \"%default%\");","map":{"version":3,"names":["React","observer","Context","GetUserDialog","GetUserDialogComponent","browserRouteIm","useNavigate","props","store","useContext","navigate","handleOnClick","getDialogOrNewFromAPI","profile","then","chat","setCurrentDialog","getCurrentDialog","setViewedDialogId","id","selfProfile"],"sources":["/data/messenger.client/src/containers/GetUserDialog.tsx"],"sourcesContent":["import React from 'react';\nimport {observer} from \"mobx-react-lite\";\nimport {Context} from \"../index\";\nimport {GetUserDialog as GetUserDialogComponent} from \"../components\";\nimport {UserProfileProps} from \"../models/props/UserProfileProps\";\nimport {browserRouteIm} from \"../routes\";\nimport {useNavigate} from \"react-router-dom\";\n\nconst GetUserDialog: React.FC<UserProfileProps> = (props) => {\n    const {store} = React.useContext(Context);\n    const navigate = useNavigate();\n\n    const handleOnClick = () => {\n        store.getDialogOrNewFromAPI(props.profile).then((chat) => {\n            if (chat) {\n                store.setCurrentDialog({\n                    ...store.getCurrentDialog(),\n                    ...chat\n                });\n                store.setViewedDialogId(chat.id);\n                navigate(browserRouteIm);\n            }\n        });\n    }\n\n    if (!props.selfProfile) {\n        return (\n            <GetUserDialogComponent callback={handleOnClick} />\n        );\n    } else {\n        return (<></>);\n    }\n}\n\nexport default observer(GetUserDialog);"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAQC,QAAQ,QAAO,iBAAiB;AACxC,SAAQC,OAAO,QAAO,UAAU;AAChC,SAAQC,aAAa,IAAIC,sBAAsB,QAAO,eAAe;AAErE,SAAQC,cAAc,QAAO,WAAW;AACxC,SAAQC,WAAW,QAAO,kBAAkB;AAAC;AAAA;AAE7C,MAAMH,aAAyC,GAAII,KAAK,IAAK;EAAA;EACzD,MAAM;IAACC;EAAK,CAAC,GAAGR,KAAK,CAACS,UAAU,CAACP,OAAO,CAAC;EACzC,MAAMQ,QAAQ,GAAGJ,WAAW,EAAE;EAE9B,MAAMK,aAAa,GAAG,MAAM;IACxBH,KAAK,CAACI,qBAAqB,CAACL,KAAK,CAACM,OAAO,CAAC,CAACC,IAAI,CAAEC,IAAI,IAAK;MACtD,IAAIA,IAAI,EAAE;QACNP,KAAK,CAACQ,gBAAgB,CAAC;UACnB,GAAGR,KAAK,CAACS,gBAAgB,EAAE;UAC3B,GAAGF;QACP,CAAC,CAAC;QACFP,KAAK,CAACU,iBAAiB,CAACH,IAAI,CAACI,EAAE,CAAC;QAChCT,QAAQ,CAACL,cAAc,CAAC;MAC5B;IACJ,CAAC,CAAC;EACN,CAAC;EAED,IAAI,CAACE,KAAK,CAACa,WAAW,EAAE;IACpB,oBACI,QAAC,sBAAsB;MAAC,QAAQ,EAAET;IAAc;MAAA;MAAA;MAAA;IAAA,QAAG;EAE3D,CAAC,MAAM;IACH,oBAAQ,qCAAK;EACjB;AACJ,CAAC;AAAA,GAxBKR,aAAyC;EAAA,QAE1BG,WAAW;AAAA;AAAA,KAF1BH,aAAyC;AA0B/C,qBAAeF,QAAQ,CAACE,aAAa,CAAC;AAAC;AAAA;AAAA"},"metadata":{},"sourceType":"module"}